<?php

/**
 * createaccount.php
 * @package adServer
 * @filesource
 */

/*	Close the backdoor	*/
$curPage=strtoupper($_SERVER['PHP_SELF']);
if(isset($curPage)&& strpos($curPage,'INDEX.PHP')===false)
	header('Location:./index.php');
    
require_once (CLASS_PATH . 'template.class.php');

/* Load the side menu */
$sideMenu = file_get_contents(TEMPLATE_PATH . 'sideMenu.tpl');

/*	load the page header	*/
$header = new template(TEMPLATE_PATH . 'header.tpl');
$header->replace('&&SIDEMENU&&', $sideMenu);
$header->replace('&&STYLE&&', $session->loggedIn ? "style='display:block;'" : "");
$header->replace('&&USER&&', $session->username);


/*	Load the page content	*/
$pageContent = new template(TEMPLATE_PATH . $nextAction . '.tpl');

/*	Remove the error container	*/
$pageContent->replace('&&ERRMSG&&', '');

/*	Echo the page	*/
echo $header->templateHtml;
echo $pageContent->templateHtml;

?>
